﻿using e_commerce.BLL.Data;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace e_commerce.BLL.Services
{
    public interface IGoodsManager
    {
        /// <summary>
        /// 添加商品
        /// </summary>
        /// <param name="goods">商品信息对象</param>
        void CreateGoods(GoodsInfo goods);

        /// <summary>
        /// 删除商品
        /// </summary>
        /// <param name="goodsId">商品id</param>
        /// <returns></returns>
        void DeleteGoodsById(int goodsId);

        /// <summary>
        /// 修改商品信息
        /// </summary>
        /// <param name="goods">商品信息对象</param>
        void ModifyGoodsInfo(GoodsInfo goods);

        /// <summary>
        /// 根据商品ID和修改后库存数量，修改商品库存
        /// </summary>
        /// <param name="goodsId">商品id</param>
        /// <param name="stock">修改后库存</param>
        void ModifyGoodsStockByGoodsId(int goodsId,int stock);

        /// <summary>
        /// 通过商品Id上架商品
        /// </summary>
        /// <param name="goodsId">商品id</param>
        /// <returns></returns>
        void OnShelvesGoods(int goodsId);

        /// <summary>
        /// 通过商品ID来下架商品
        /// </summary>
        /// <param name="goodsId">商品id</param>
        /// <returns></returns>
        void OffShelvesGoods(int goodsId);

    }
}
